package com.sy.bean;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;

@Data
@ApiModel("用户")
public class User {
    @ApiModelProperty(value = "用户密码",required = true)
    @NotBlank(message = "用户名不能为空!")
    @Length(min = 2, message = "用户名长度为6~50", max = 50)
    String username;
    @ApiModelProperty(value = "用户名",required = true)
    @NotBlank(message = "密码不能为空!")
    String password;
}
